import sys

def fibonacci(n): # builder function - fibonacci
    a,b,counter = 0,1,0
    while True:
        if(counter > n):
            return
        yield a
        a,b = b,a + b
        '''
        it's the same with down
        n = b
        b = a + b
        a = n
        '''
        counter += 1
f = fibonacci(10) # f is a iteratr,and it's build by builder

while True:
    try:
        print(next(f),end = " ")
    except StopIteration:
        sys.exit()